<?php
/**
 * 足球直播数据
 */
namespace app\sports\analysis\model;

use think\Db;
use think\Model;

class AnalysisModel extends Model
{

    private $database = 'sports_database';

    /*
     * 判断当前的赛事的数据是否存在
     *
     */
    public function IsAnalysis($nami_team_id)
    {
        return Db::database($this->database)->table('foot_ball_match_analysis')->where('nami_match_id',$nami_team_id)->find();
    }

    /*
     * 添加足球分析数据
     */
    public function InsertAnalysis(array $array){
        return Db::database($this->database)->table('foot_ball_match_analysis')->strict()->insert($array);
    }

    /*
     * 更新足球分析数据
     */
    public function UpdateAnalysis(array $array) {
        return Db::database($this->database)->table('foot_ball_match_analysis')->where(['id'=>$array['id']])->update($array);
    }





}